﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class AdminCMS_Title_Check : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string cTitle = string.Empty;
        UIMethod.GetQuery(ref cTitle, "title", true);
        int FromClass = 0;
        UIMethod.GetQuery(ref FromClass, "fromclass");

        int output = 0;

        if (cTitle != string.Empty)
        {
            output = DataEntity.Common.ExecuteScalar<int>(
                "select count(*) from tab_ArticleBase where art_FromClass = @art_FromClass and art_Title = @art_Title", 
                new string[] { "@art_FromClass", "@art_Title" }, 
                new object[] { FromClass, cTitle });
        }

        Response.Clear();
        Response.Write(output.ToString());
        Response.End();
    }
}
